<! DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>数组分隔</title>
</head>
<body>
<script>
    var array=['aa','bb','cc','dd','ee'];
    var str=array[0];
    var seperator='|';
    for(var i=1;i<array.length;i++){
        str+=seperator+array[i];
    }
    console.log(str);
    document.write();
    
</script>
</body>
</html>
